Skip to content

Conversation

@vursen
Copy link
Contributor

@vursen vursen commented Jan 19, 2026

Description

Add RangeSlider component that allows selecting a numeric range with two handles. Includes RangeSliderValue record for the start/end value pair and updates SliderBase to support custom value converters.

Depends on

Fixes #8481

Type of change

  • Feature

vursen and others added 30 commits January 14, 2026 16:46
Add Slider Flow component wrapping <vaadin-slider> web component.
The Slider extends AbstractSinglePropertyField and provides min, max,
step, and value properties.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Remove explicit flow dependency versions from integration-tests pom.xml
- Add README.md and LICENSE files
- Add vite.config.ts for integration tests

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add tests for constructors, min/max/step properties, and validation
that throws IllegalArgumentException for invalid values.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
…ider

- Add ExperimentalFeatureException thrown when feature flag is disabled
- Add feature flag check in Slider.onAttach
- Add getMin, getMax, getStep methods to SliderElement
- Add basic integration test verifying slider properties

Co-Authored-By: Claude Opus 4.5 <[email protected]>
…rties

- Create SliderBase<TComponent, TValue> abstract class extending AbstractSinglePropertyField
- Move min, max, step getters/setters with validation to SliderBase
- Update Slider to extend SliderBase<Slider, Double>

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Move min, max, step tests to SliderBaseTest. Add tests for SliderBase
constructors and value change listener constructors.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add a utility method to schedule actions that run before the client
response, with deduplication by key. This allows deferring state
validity checks until all property changes are complete.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Log warnings when setMin, setMax, or setStep is called and the current
value becomes inconsistent with the new constraints. The warnings are
deferred using beforeClientResponse to check the final state after all
property changes in the current request are complete.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add tests verifying that warnings are logged when value doesn't align
with min, max, or step constraints after property changes.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Change SliderBase constructor from protected to package-private.
Update SliderTest to use the 4-parameter constructor with step value.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add constructors that use default step value of 1:
- Slider(min, max, value)
- Slider(min, max, value, listener)
- Slider(label, min, max, value)
- Slider(label, min, max, value, listener)

Add corresponding unit tests verifying step defaults to 1.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add RangeSlider component that allows selecting a numeric range with two
handles. Includes RangeSliderValue record for the start/end value pair
and updates SliderBase to support custom value converters.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Move the "start value cannot be greater than end value" validation from
RangeSlider#setValue to the RangeSliderValue compact constructor, ensuring
the invariant is enforced at construction time.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@vursen vursen changed the title feat: add RangeSlider component with start/end value support feat: create RangeSlider component Jan 26, 2026
vursen and others added 15 commits January 26, 2026 13:44
Add RangeSliderTest with tests for constructors, setValue validation,
interface implementations, and property setters/getters.

Add RangeSliderSerializableTest for serialization testing.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add constructors with various parameter combinations including label,
min/max range, step, initial value, and value change listener. Also
add corresponding unit tests for all new constructors.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add RangeSliderElement testbench class and basic IT test that verifies
min, max, step, and value properties are correctly set on the component.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Update SliderBase to use SerializableBiFunction for value converters,
allowing subclasses to access component state during conversion. Remove
unused constructor and inline init method. Update Slider to validate
values during conversion and throw exceptions for invalid min/max/step
changes. Remove SliderWarningsTest as warnings are replaced with
exceptions.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Update RangeSlider to use SerializableBiFunction for value converters,
allowing validation during conversion. Throw exceptions for invalid
min/max/step changes instead of logging warnings. Remove
RangeSliderWarningsTest as warnings are replaced with exceptions.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@vaadin-bot
Copy link
Collaborator

TC Format Checker Report - 13:44 - 26 - Jan

BLOCKER There are 1 files with format errors

  • To see a complete report of formatting issues, download the differences file

  • To fix the build, please run mvn spotless:apply in your branch and commit the changes.

  • Optionally you might add the following line in your .git/hooks/pre-commit file:

    mvn spotless:apply
    

Here is the list of files with format issues in your PR:

vaadin-slider-flow-parent/vaadin-slider-flow/src/main/java/com/vaadin/flow/component/slider/Slider.java

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants